# coding:utf-8
def hex_checksum(data):   #计算校验和，data为数组，返回数组
    checksum = 0x00
    for i in range(0, len(data)):
        x = int(data[i], 16)
        checksum += x
        if checksum > 256:
            checksum = checksum % 256
    return ('%02x' % checksum).upper().split()